package cn.tedu.csmall.product.mapper;

import cn.tedu.csmall.product.pojo.entity.PmsCategory;
import cn.tedu.csmall.product.pojo.vo.CategoryListItemVo;
import cn.tedu.csmall.product.pojo.vo.CategoryStandardVo;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CategoryMapper {
    int insert(PmsCategory pmsAttribute);

    int insertBatch(List<PmsCategory> pmsAttributes);

    int deleteById(long l);

    int deleteByIds(Long[] l);

    int update(PmsCategory pmsAttribute);

    int count();

    CategoryStandardVo selectById(Long id);

    List<CategoryStandardVo> list();

    int countByName(String name);

    int countByNameNotById(String name,Long id);

    int countByParentId(Long id);

    List<CategoryListItemVo> listByParentIds(Long id);

    CategoryStandardVo selectByParentId(Long parentId);
}
